home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / flight-of-the-museum.swf / scripts / engine / levelData / Level_14.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  2.6 KB  |  85 lines

  1. package engine.levelData
  2. {
  3.    import copy.CopyBank;
  4.    import engine.WorldScene;
  5.    import engine.dynamicObjects.*;
  6.    
  7.    public class Level_14 extends LevelData
  8.    {
  9.        
  10.       
  11.       public function Level_14()
  12.       {
  13.          super();
  14.          _goalParameters = new Array();
  15.       }
  16.       
  17.       override public function buildLevel() : *
  18.       {
  19.          var i:* = undefined;
  20.          var tablet:* = undefined;
  21.          var gTabs:Number = NaN;
  22.          var fuelIcon:* = undefined;
  23.          var giantTentacle:* = undefined;
  24.          var goalObj:Object = null;
  25.          var missionObj:Object = null;
  26.          var rX:Number = NaN;
  27.          super.buildLevel();
  28.          gTabs = 15;
  29.          for(i = 0; i < gTabs; i++)
  30.          {
  31.             tablet = new TabletPiece();
  32.             tablet.x = 3000 + i * 250;
  33.             tablet.y = 800 + Math.random() * 100;
  34.             WorldScene.Instance.GameplayObjects.push(tablet);
  35.          }
  36.          fuelIcon = new FuelIcon();
  37.          fuelIcon.x = 3000;
  38.          fuelIcon.y = 750;
  39.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  40.          fuelIcon = new FuelIcon();
  41.          fuelIcon.x = 4000;
  42.          fuelIcon.y = 750;
  43.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  44.          fuelIcon = new FuelIcon();
  45.          fuelIcon.x = 5000;
  46.          fuelIcon.y = 750;
  47.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  48.          fuelIcon = new FuelIcon();
  49.          fuelIcon.x = 6000;
  50.          fuelIcon.y = 750;
  51.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  52.          for(i = 0; i < 7; i++)
  53.          {
  54.             rX = 3000 + i * 550;
  55.             giantTentacle = new GiantTentacle();
  56.             giantTentacle.r = -Math.PI / 1.1;
  57.             giantTentacle.baseX = rX;
  58.             giantTentacle.baseY = 1200;
  59.             giantTentacle.hiddenX = rX;
  60.             giantTentacle.hiddenY = 1600;
  61.             giantTentacle.init();
  62.             WorldScene.Instance.TentacleObjects.push(giantTentacle);
  63.          }
  64.          _missionDescription = CopyBank.Instance.MissionDesc_Tablets;
  65.          goalObj = {
  66.             "Type":"Tablet",
  67.             "Count":gTabs
  68.          };
  69.          _goalParameters.push(goalObj);
  70.          missionObj = {
  71.             "Description":_missionDescription,
  72.             "BoundsX":_missionBoundsX,
  73.             "BoundsHint":_missionBoundsHint,
  74.             "GoalParamaters":_goalParameters,
  75.             "PrimaryGoalType":"Tablets",
  76.             "StartLoc":{
  77.                "x":5000,
  78.                "y":750
  79.             }
  80.          };
  81.          WorldScene.Instance.setMissionDetails(missionObj);
  82.       }
  83.    }
  84. }
  85.